const express = require('express');
const router = express.Router();
const activityController = require('../controllers/activity.controller');

/**
 * @swagger
 * /api/activities/recent:
 *   get:
 *     summary: 获取全站最新活动（公开接口，无需登录）
 *     tags: [活动]
 *     parameters:
 *       - in: query
 *         name: page
 *         schema:
 *           type: integer
 *           default: 1
 *         description: 页码
 *       - in: query
 *         name: limit
 *         schema:
 *           type: integer
 *           default: 10
 *         description: 每页数量
 *       - in: query
 *         name: type
 *         schema:
 *           type: string
 *         description: 活动类型筛选
 *     responses:
 *       200:
 *         description: 获取成功
 *         content:
 *           application/json:
 *             schema:
 *               type: object
 *               properties:
 *                 success:
 *                   type: boolean
 *                 code:
 *                   type: integer
 *                 message:
 *                   type: string
 *                 data:
 *                   type: object
 *                   properties:
 *                     data:
 *                       type: array
 *                       items:
 *                         type: object
 *                     pagination:
 *                       type: object
 */
router.get('/recent', activityController.getRecentActivities);
router.get('/rooms', activityController.getRoomsInfo);

module.exports = router;
